package com.myspace.backend.controller.post;

import com.myspace.backend.service.post.PostAddService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class PostAddController {

    @Autowired
    private PostAddService postAddService;

        @PostMapping("/myspace/post/add/")
    public Map<String, String> postAdd(@RequestParam Map<String, String> map) {
        String content = map.get("content");
        return postAddService.postAdd(content);
    }

}
